]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mixer-control: Only stream-id for bluetooth devices only
authorGuido Günther <agx@sigxcpu.org>
Fri, 6 Feb 2026 17:24:26 +0000 (18:24 +0100)
committerSimon McVittie <smcv@debian.org>
Mon, 16 Feb 2026 19:59:30 +0000 (19:59 +0000)
They're the only ones that merely flip ports and clearing it for
other devices breaks e.g. lineout and headphone combinations.

Fixes: 8bf60ee ("mixer-control: Reset `stream-id`s on UI devices")
Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/40
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Gbp-Pq: Name mixer-control-Only-stream-id-for-bluetooth-devices-only.patch

subprojects/gvc/gvc-mixer-control.c

index 45764849bb2e0c2ffbc6ecbc10b587bd84d72516..57dc2d4f2ccde177fc7e935f19c10029e2db7a18 100644 (file)
@@ -1218,7 +1218,8 @@ add_stream (GvcMixerControl *control,
 static gboolean
 match_stream_with_devices (GvcMixerControl    *control,
                            GvcMixerStreamPort *stream_port,
-                           GvcMixerStream     *stream)
+                           GvcMixerStream     *stream,
+                           gboolean            is_bluetooth)
 {
         g_autoptr (GList)        devices = NULL;
         guint                    stream_card_id;
@@ -1279,7 +1280,7 @@ match_stream_with_devices (GvcMixerControl    *control,
                                         in_possession = TRUE;
                                 } else {
                                         /* Other UI devices on that card that match the stream can't be valid */
-                                        if (device_stream_id == stream_id) {
+                                        if (device_stream_id == stream_id && is_bluetooth) {
                                                 g_object_set (G_OBJECT (device),
                                                               "stream-id", GVC_MIXER_UI_DEVICE_INVALID,
                                                               NULL);
@@ -1390,7 +1391,7 @@ sync_devices (GvcMixerControl *control,
                 GvcMixerStreamPort *stream_port;
                 stream_port = n->data;
 
-                if (match_stream_with_devices (control, stream_port, stream))
+                if (match_stream_with_devices (control, stream_port, stream, is_bluetooth))
                         continue;
 
                 g_warning ("Sync_devices: Failed to match stream id: %u, description: '%s', origin: '%s'",